Skip to content

fix(ai): move @standard-schema/spec to dependencies (closes #602)#615

Merged
AlemTuzlak merged 1 commit into
mainfrom
fix/standard-schema-spec-dependency-602
May 21, 2026
Merged

fix(ai): move @standard-schema/spec to dependencies (closes #602)#615
AlemTuzlak merged 1 commit into
mainfrom
fix/standard-schema-spec-dependency-602

Conversation

@AlemTuzlak
Copy link
Copy Markdown
Contributor

@AlemTuzlak AlemTuzlak commented May 21, 2026

Summary

  • Move @standard-schema/spec from devDependencies to dependencies in @tanstack/ai.
  • Published .d.ts files (types.d.ts, activities/chat/tools/tool-definition.d.ts, activities/chat/tools/schema-converter.d.ts) import type from @standard-schema/spec, so consumers need it installed for type resolution to succeed.

Why this matters

With skipLibCheck: true, tsc silently ignores the unresolved module reference inside .d.ts files. But type-aware tools like @typescript-eslint (with recommendedTypeChecked / projectService: true) follow the full type chain. When it hits the missing module, the entire type resolution for useChat() fails, producing an "error type" that cascades through all usages:

Unsafe assignment of an error typed value

The dep is also pulled in transitively by all framework packages (ai-react, ai-solid, ai-svelte, ai-vue, ai-client) since they re-export types from @tanstack/ai.

Test plan

  • pnpm test:sherif — workspace dep consistency passes
  • pnpm test:knip — no unused dep flagged
  • pnpm --filter @tanstack/ai test:types — type check passes
  • pnpm --filter @tanstack/ai test:lib — 899 tests pass
  • pnpm --filter @tanstack/ai test:build — publint passes
  • pnpm test:eslint — lint passes across affected projects

No behavior change — packaging fix only.

Closes #602.

Summary by CodeRabbit

  • Dependencies
    • @standard-schema/spec (v1.1.0+) has been moved from dev dependencies to runtime dependencies.

Review Change Stack

The package's published .d.ts files import types from @standard-schema/spec,
so it must be a runtime dependency for consumers' type resolution to work.

With skipLibCheck: true, tsc silently ignored the unresolved module, but
type-aware tools like @typescript-eslint (with recommendedTypeChecked /
projectService: true) failed to resolve return types - surfacing as
"Unsafe assignment of an error typed value" on useChat() destructuring and
cascading errors through downstream usages.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b513d686-78e3-43a2-863d-4c4cf523faf5

📥 Commits

Reviewing files that changed from the base of the PR and between 0f18f64 and ef026fb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • .changeset/standard-schema-spec-dependency.md
  • packages/typescript/ai/package.json

📝 Walkthrough

Walkthrough

The PR moves @standard-schema/spec from devDependencies to dependencies in @tanstack/ai's package.json. Published .d.ts files import from this package, so type-aware linting tools and type checkers in consumer projects require it to be installed as a regular dependency.

Changes

Move @standard-schema/spec to dependencies

Layer / File(s) Summary
Dependency shift and change documentation
packages/typescript/ai/package.json, .changeset/standard-schema-spec-dependency.md
@standard-schema/spec (^1.1.0) is added to dependencies and removed from devDependencies. The changeset documents this shift and explains that published .d.ts files import this package, so consumers must have it installed for type resolution to work with type-aware tooling like @typescript-eslint.

🎯 1 (Trivial) | ⏱️ ~5 minutes

🐰 A spec hops into dependencies with grace,
No longer hiding in dev's secret place,
Type checkers now find what they seek,
No broken imports for the week! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: moving @standard-schema/spec to dependencies in the ai package, with an issue reference.
Description check ✅ Passed The description provides comprehensive context including motivation, technical details of the issue, test plan with specific test commands, and expected outcomes.
Linked Issues check ✅ Passed The PR fully addresses #602 by moving @standard-schema/spec from devDependencies to dependencies, resolving the type-resolution issue for type-aware linting tools.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing #602: updating package.json and creating a changeset documenting the dependency shift.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/standard-schema-spec-dependency-602

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 18 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/ai 0.21.0 → 0.21.1 Changeset
@tanstack/ai-client 0.11.4 → 0.11.5 Dependent
@tanstack/ai-code-mode 0.1.17 → 0.1.18 Dependent
@tanstack/ai-code-mode-skills 0.1.17 → 0.1.18 Dependent
@tanstack/ai-devtools-core 0.3.34 → 0.3.35 Dependent
@tanstack/ai-event-client 0.3.7 → 0.3.8 Dependent
@tanstack/ai-fal 0.7.10 → 0.7.11 Dependent
@tanstack/ai-isolate-cloudflare 0.2.8 → 0.2.9 Dependent
@tanstack/ai-isolate-node 0.1.17 → 0.1.18 Dependent
@tanstack/ai-isolate-quickjs 0.1.17 → 0.1.18 Dependent
@tanstack/ai-preact 0.6.29 → 0.6.30 Dependent
@tanstack/ai-react 0.11.4 → 0.11.5 Dependent
@tanstack/ai-solid 0.10.4 → 0.10.5 Dependent
@tanstack/ai-svelte 0.10.4 → 0.10.5 Dependent
@tanstack/ai-vue 0.10.5 → 0.10.6 Dependent
@tanstack/ai-vue-ui 0.2.0 → 0.2.1 Dependent
@tanstack/preact-ai-devtools 0.1.38 → 0.1.39 Dependent
@tanstack/react-ai-devtools 0.2.38 → 0.2.39 Dependent
@tanstack/solid-ai-devtools 0.2.38 → 0.2.39 Dependent

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 21, 2026

View your CI Pipeline Execution ↗ for commit ef026fb

Command Status Duration Result
nx run-many --targets=build --exclude=examples/... ✅ Succeeded 1m 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-21 11:28:48 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/@tanstack/ai@615

@tanstack/ai-anthropic

npm i https://pkg.pr.new/@tanstack/ai-anthropic@615

@tanstack/ai-client

npm i https://pkg.pr.new/@tanstack/ai-client@615

@tanstack/ai-code-mode

npm i https://pkg.pr.new/@tanstack/ai-code-mode@615

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@615

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/@tanstack/ai-devtools-core@615

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@615

@tanstack/ai-event-client

npm i https://pkg.pr.new/@tanstack/ai-event-client@615

@tanstack/ai-fal

npm i https://pkg.pr.new/@tanstack/ai-fal@615

@tanstack/ai-gemini

npm i https://pkg.pr.new/@tanstack/ai-gemini@615

@tanstack/ai-grok

npm i https://pkg.pr.new/@tanstack/ai-grok@615

@tanstack/ai-groq

npm i https://pkg.pr.new/@tanstack/ai-groq@615

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@615

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/@tanstack/ai-isolate-node@615

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@615

@tanstack/ai-ollama

npm i https://pkg.pr.new/@tanstack/ai-ollama@615

@tanstack/ai-openai

npm i https://pkg.pr.new/@tanstack/ai-openai@615

@tanstack/ai-openrouter

npm i https://pkg.pr.new/@tanstack/ai-openrouter@615

@tanstack/ai-preact

npm i https://pkg.pr.new/@tanstack/ai-preact@615

@tanstack/ai-react

npm i https://pkg.pr.new/@tanstack/ai-react@615

@tanstack/ai-react-ui

npm i https://pkg.pr.new/@tanstack/ai-react-ui@615

@tanstack/ai-solid

npm i https://pkg.pr.new/@tanstack/ai-solid@615

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/@tanstack/ai-solid-ui@615

@tanstack/ai-svelte

npm i https://pkg.pr.new/@tanstack/ai-svelte@615

@tanstack/ai-utils

npm i https://pkg.pr.new/@tanstack/ai-utils@615

@tanstack/ai-vue

npm i https://pkg.pr.new/@tanstack/ai-vue@615

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/@tanstack/ai-vue-ui@615

@tanstack/openai-base

npm i https://pkg.pr.new/@tanstack/openai-base@615

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@615

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/@tanstack/react-ai-devtools@615

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@615

commit: ef026fb

@AlemTuzlak AlemTuzlak merged commit 573f12e into main May 21, 2026
10 checks passed
@AlemTuzlak AlemTuzlak deleted the fix/standard-schema-spec-dependency-602 branch May 21, 2026 12:10
@github-actions github-actions Bot mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@standard-schema/spec missing from dependencies. Breaks type-checked linting (e.g. @typescript-eslint)

1 participant